package com.service;

import com.shiro.User;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

/**
 * 功能或描述：
 *
 * @Package com.service
 * @Author: DR.YangLong
 * @Date: 14-10-7
 * @Time: 下午5:14
 * @Email: 410357434@163.com
 * @Version: 1.0
 * @Module: 修正:            日期：
 */
@Service(value = "cacheService")
public class CacheService {
    @Cacheable(value = "user")
    public User getUser(int id){
        User user=new User();
        user.setUsername("yanglong");
        user.setPassword("yanglong");
        user.setId(id);
        user.setLocked(false);
        return user;
    }
}
